<template>
    <div>
        <h3>App</h3>
        {{num}}
        <Child></Child>
    </div>
</template>

<script>
import Child from '@/components/Child.vue'

export default {
    name: "App",
    components: {Child},
    data() {
        return {
            num: 1
        }
    },
    methods: {
        addNum() {
            this.num++
        }
    },
    provide() {
        return {
            num: this.num,
            addNum:this.addNum
        }
    }
}
</script>